package Offen_FunctionInterface;

import java.util.function.Supplier;

public class Offen_FunctionInterface1 {
    public static String getString(Supplier<String> sup)
    {
        return sup.get();
    }//方法在执行get方法的时候就会返回定义的泛型

    public static void main(String[] args) {
        String s = getString(()->{
            return "早上好";
        });
        System.out.println(s);
    }
}
